/****************************************************************
 * I am the AC 130 vs Pirate game. I allow the user to control an 
 * AC130 gunship in the hunt for Modern day pirates. The player  
 * will be allowed to roam free across a section of ocean/coastline.  
 * In the water there will be four types of vessels: Merchant  
 * ships that the player must protect, Pirate ships that the player  
 * must identify and destroy, Fishing boats that look like Pirate  
 * ships that the player must not destroy, and Friendly Navy ships  
 * that can capture pirates for extra points. Time permitting there  
 * may also be ground targets to attack. 
 *
 * Key elements of this project will be the Player/AC130, the Ships,  
 * the ShipAI system, the collision grid, the debris controller, the  
 * Ground/Water, Clouds, and scoring system. This project will make  
 * use of an external text file to store useful game parameters,  
 * thus allowing us to play balance the game without recompiling  
 * the executable. 
 *****************************************************************
 * I am the Game Play Screen. I contain all world objects that are 
 * needed to maintain the game play. The player will be spending most
 * of their time on this screen. External screens will have te ability
 * to communicate settings to this screen via the GamData Class.
 *****************************************************************/

#include "baseScreen.h"
#include "camera.h"
#include "ground.h"
#include "plane.h"
#include "BulletCtrl.h"
#include "BuildingCtrl.h"
#include "CrashBin.h"
#include "ShipCtrl.h"


#ifndef __SC_GAME_PLAY_H__
#define __SC_GAME_PLAY_H__



class scGamePlay : public BaseScreen {
public:
		// game objects
	Camera * myCam;
	Ground * myGround;
	Plane * myPlane;
	ShipCtrl * myShipCtrl;
	BulletCtrl * myBulletCtrl;
	BuildingCtrl * myBuildingCtrl;
	CrashBin * myCrashBin;
		// input data
	Point * worldMouseCur;
	Point * worldMouseDn;

		// input toggles
	bool isLdown;
	bool isRdown;
	float zoomRate;

	float dx, dy;
	int editMode;	// 1-Game play Mode, 2-Ground Edit, 3-Building Edit
	int editIndex;	// the index of the Item we are editing
public:
	scGamePlay();
	~scGamePlay();
		// used on startup to copy exState to local state pointer
	void Init(GameData *gd);

	void OnStart();	// run when screen is made active
	void OnClose();	// run before another screen is made active

	void OnMouseDn(int mouseX, int mouseY, int bt);
	void OnMouseUp(int mouseX, int mouseY, int bt);

	void OnKeyDn(int keyCode);
	void OnKeyUp(int keyCode);

	void Update();	// run on constant time interval 60 millisecconds
		// update assisters
	bool UpdateEdit();

	void Draw(BITMAP * scr);	// run prior to back buffer blit.
		// draw assisters
};

#endif